<pre class="code">
<span class="srcline"><span class="lineno"><a href="36,1" id="srcline1"> 1</a></span><span class="line"></span></span>
<span class="srcline"><span class="lineno"><a href="36,2" id="srcline2"> 2</a></span><span class="line"></span></span>
<span class="srcline"><span class="lineno"><a href="36,3" id="srcline3"> 3</a></span><span class="line"><span class="keyword">function</span> <span class="var type1" id="S2T34U3">body</span> = Body_plane( <span class="mxinfo" id="T7:U2"><span class="mxinfo" id="T7:U3"><span class="var type1" id="S3T7U6">point</span></span></span>, <span class="mxinfo" id="T7:U5"><span class="mxinfo" id="T7:U6"><span class="var type1" id="S4T7U7">normal</span></span></span> )</span></span>
<span class="srcline"><span class="lineno"><a href="36,4" id="srcline4"> 4</a></span><span class="line"><span class="comment">%#codegen</span></span></span>
<span class="srcline"><span class="lineno"><a href="36,5" id="srcline5"> 5</a></span><span class="line">    <span class="var type1" id="S2T34U10">body</span> = <span class="mxinfo" id="T17:U9"><span class="fcn" id="F31N2:B12">Body</span>()</span>;</span></span>
<span class="srcline"><span class="lineno"><a href="36,6" id="srcline6"> 6</a></span><span class="line">    <span class="mxinfo" id="T33:U10"><span class="mxinfo" id="T33:U11"><span class="var type1" id="S2T34U16">body</span>.type</span> = <span class="mxinfo" id="T10:U13"><span class="string">'plane'</span></span></span>; </span></span>
<span class="srcline"><span class="lineno"><a href="36,7" id="srcline7"> 7</a></span><span class="line">    <span class="mxinfo" id="T22:U14"><span class="mxinfo" id="T22:U15"><span class="var type1" id="S2T34U22">body</span>.color</span> = <span class="mxinfo" id="T22:U17">[<span class="mxinfo" id="T1:U18">.6</span> <span class="mxinfo" id="T1:U19">.6</span> <span class="mxinfo" id="T1:U20">.6</span>]</span></span>; </span></span>
<span class="srcline"><span class="lineno"><a href="36,8" id="srcline8"> 8</a></span><span class="line">    <span class="mxinfo" id="T4:U21"><span class="mxinfo" id="T4:U22"><span class="var type1" id="S2T34U32">body</span>.dynamic</span> = <span class="mxinfo" id="T4:U24">false</span></span>;   <span class="comment">% We require that all plane bodies are static</span></span></span>
<span class="srcline"><span class="lineno"><a href="36,9" id="srcline9"> 9</a></span><span class="line">    </span></span>
<span class="srcline"><span class="lineno"><a href="36,10" id="srcline10">10</a></span><span class="line">    <span class="keyword">if</span> nargin &gt; 0</span></span>
<span class="srcline"><span class="lineno"><a href="36,11" id="srcline11">11</a></span><span class="line">       <span class="mxinfo" id="T7:U25"><span class="mxinfo" id="T7:U26"><span class="var type1" id="S2T34U45">body</span>.u</span> = <span class="var type1" id="S3T7U47">point</span></span>;</span></span>
<span class="srcline"><span class="lineno"><a href="36,12" id="srcline12">12</a></span><span class="line">       <span class="mxinfo" id="T35:U29"><span class="mxinfo" id="T35:U30"><span class="var type1" id="S2T34U51">body</span>.plane_normal</span> = <span class="mxinfo" id="T7:U32"><span class="mxinfo" id="T7:U33"><span class="var type1" id="S4T7U54">normal</span></span>/<span class="mxinfo" id="T1:U35">norm(<span class="var type1" id="S4T7U57">normal</span>)</span></span></span>; </span></span>
<span class="srcline"><span class="lineno"><a href="36,13" id="srcline13">13</a></span><span class="line">    <span class="keyword">end</span></span></span>
<span class="srcline"><span class="lineno"><a href="36,14" id="srcline14">14</a></span><span class="line"></span></span>
<span class="srcline"><span class="lineno"><a href="36,15" id="srcline15">15</a></span><span class="line"><span class="keyword">end</span></span></span>
<span class="srcline"><span class="lineno"><a href="36,16" id="srcline16">16</a></span><span class="line"></span></span>
</pre>
